<html><head><title>GPLS model based on NIPALS algorithm</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>gplsone(plstools)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   gplsone">
<param name="keyword" value="R:   gplsone.fit">
<param name="keyword" value="R:   cgplsone.fit">
<param name="keyword" value="R:   residuals.gplsone">
<param name="keyword" value="R:   scalew">
<param name="keyword" value=" GPLS model based on NIPALS algorithm">
</object>


<h2>GPLS model based on NIPALS algorithm</h2>


<h3>Description</h3>

<p>
Generalized Partial least squares regresssion based on NIPALS algorithm (IWPLS).
</p>


<h3>Usage</h3>

<pre>
gplsone(formula, data,subset,weights=NULL,na.action,offset,
  family=gaussian,nf = 2,method="gplsone.fit",scale=FALSE,
  tol=1e-9,deps=1e-20,nitermax=100, ...)
gplsone.fit(y,X,nf=2,family,weights=NULL,tol=1e-9,deps=1e-20,
  nitermax=100,scale=FALSE,...)
cgplsone.fit(y,X,nf=2,family,weights=NULL,tol=1e-9,deps=1e-20,
  nitermax=100,scale=FALSE,...)
## S3 method for class 'gplsone':
residuals(object,...)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>object</code></td>
<td>
an object of class inheriting from 'gplsone'.</td></tr>
<tr valign="top"><td><code>formula</code></td>
<td>
an object of class <code>formula</code> (or one that can be coerced to that class):
a symbolic description of the model to be fitted. The details of model specification are given under Details.</td></tr>
<tr valign="top"><td><code>data</code></td>
<td>
an optional data frame, list or environment (or object coercible by as.data.frame to a data frame)
containing the variables in the model. If not found in data, the variables are taken from environment(formula)</td></tr>
<tr valign="top"><td><code>family</code></td>
<td>
a description of the error distribution and link function to be used in the model.
This can be a character   string naming a family function, a family function or the result
of a call to a family function. (See "family" for details of family functions.)</td></tr>
<tr valign="top"><td><code>weights</code></td>
<td>
an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.</td></tr>
<tr valign="top"><td><code>subset</code></td>
<td>
an optional vector specifying a subset of observations to be used in the fitting process.</td></tr>
<tr valign="top"><td><code>na.action</code></td>
<td>
a function which indicates what should happen when the data contain NAs. The default is set
by the na.action setting of options, and is na.fail if that is unset. The 'factory-fresh' default is na.omit.
Another possible value is NULL, no action. Value na.exclude can be useful. Value na.pass is used
to take in account the missing values.</td></tr>
<tr valign="top"><td><code>offset</code></td>
<td>
this can be used to specify an a priori known component to be included in the linear predictor
during fitting. This should be NULL or a numeric vector of length either one or equal to the number of cases.
One or more offset terms can be included in the formula instead or as well, and if both are specified
their sum is used (See model.offset).</td></tr>
<tr valign="top"><td><code>y</code></td>
<td>
a numeric vector corresponding to the response</td></tr>
<tr valign="top"><td><code>X</code></td>
<td>
a numeric data.frame corresponding to explanatory variables (see <code>model.matrix</code>)</td></tr>
<tr valign="top"><td><code>nf</code></td>
<td>
an integer indicating the number of kept components</td></tr>
<tr valign="top"><td><code>scale</code></td>
<td>
a logical value. If scale is TRUE, X is scaled by dividing each variable
by its sample standard deviation (by deafult, scale=TRUE).</td></tr>
<tr valign="top"><td><code>method</code></td>
<td>
the method to be used in fitting the model. The default method "plsone.fit" uses partial least squares (PLS).
The only current alternative is "model.frame" which returns the model frame and does no fitting.</td></tr>
<tr valign="top"><td><code>tol</code></td>
<td>
positive convergence tolerance (by default, tol=1e-9).</td></tr>
<tr valign="top"><td><code>deps</code></td>
<td>
positive tolerance (used in the computation of convergence value,by default deps=1e-20).</td></tr>
<tr valign="top"><td><code>nitermax</code></td>
<td>
integer giving the maximal number of IWPLS iterations (by default, nitermax=100).</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
further arguments passed to or from other methods.</td></tr>
</table>

<h3>Details</h3>

<p>
The function 'plsone' is regression methods based on partail least square.<br>
The default method 'plsone.fit' uses NIPALS algorithm.<br>
The Coordinates ch,th, ph and ch correspond to Slopes equation in linear least squares regression without intercept
term and can be compute with missing data.<br>
+ additional details on the computation of the terms.<br>
The function 'gplsone' is base on two functions: scalew (from the library ade4) and delete.intercept (from the library pls).
For more details on these both methods, you can directly consult their documentations.<br>
The functions 'cgplsone.fit' is based on C code and the function 'gpls' is programmed in R.
</p>


<h3>Value</h3>

<p>
The function 'gplsone' returns an object of class inheriting from 'plsone'.
</p>
<table summary="R argblock">
<tr valign="top"><td><code>glm</code></td>
<td>
an object 'glm' based on the PLS components (th)</td></tr>
<tr valign="top"><td><code>bh</code></td>
<td>
an numeric vector which contains coefficients associated with the explanatory variables</td></tr>
<tr valign="top"><td><code>y</code></td>
<td>
a numeric vector corresponding to the response</td></tr>
<tr valign="top"><td><code>x</code></td>
<td>
a numeric data.frame corresponding to explanatory variables</td></tr>
<tr valign="top"><td><code>ch</code></td>
<td>
a numeric vector containing regression coefficients of y on the components 'th'</td></tr>
<tr valign="top"><td><code>th</code></td>
<td>
an object 'data.frame' containing the conponents 'th'.</td></tr>
<tr valign="top"><td><code>uh</code></td>
<td>
an object 'data.frame' containing normalised residuals for h &gt; 1.</td></tr>
<tr valign="top"><td><code>ph</code></td>
<td>
an object 'data.frame' containing regression coefficient  of the <i>h_{th}</i> columns of <i>X_{h-1}</i> on t(h).</td></tr>
<tr valign="top"><td><code>wh</code></td>
<td>
an object 'data.frame' containing regression coefficient  of the <i>h_{th}</i> columns of <i>X_{h-1}</i> on y(h-1).</td></tr>
<tr valign="top"><td><code>whx</code></td>
<td>
an object 'data.frame' containing regression coefficent of th on explanatory variables.</td></tr>
<tr valign="top"><td><code>nf</code></td>
<td>
an integer indicating the number of kept components.</td></tr>
<tr valign="top"><td><code>formula</code></td>
<td>
the initial formula supplied.</td></tr>
<tr valign="top"><td><code>method</code></td>
<td>
the name of the fitter function used, currently always "plsone.fit".</td></tr>
<tr valign="top"><td><code>call</code></td>
<td>
generally match.call()</td></tr>
</table>

<h3>Note</h3>

<p>
The function 'pls' use the function 'delete.intercept' from the package <code><a onclick="findlink('pls', 'pls-package.html')" style="text-decoration: underline; color: blue; cursor: hand">pls</a></code>.
</p>


<h3>References</h3>

<p>
Marx 1996
</p>


<h3>See Also</h3>

<p>
<code><a onclick="findlink('gpls', 'gpls.html')" style="text-decoration: underline; color: blue; cursor: hand">gpls</a></code>, <code><a onclick="findlink('pls', 'delete.intercept.html')" style="text-decoration: underline; color: blue; cursor: hand">delete.intercept</a></code>,
<code><a onclick="findlink('stats', 'glm.html')" style="text-decoration: underline; color: blue; cursor: hand">glm</a></code>
</p>


<h3>Examples</h3>

<pre>
require(pls)
data(yarn)

</pre>

<script Language="JScript">
function findlink(pkg, fn) {
var Y, link;
Y = location.href.lastIndexOf("\\") + 1;
link = location.href.substring(0, Y);
link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
location.href = link;
}
</script>


<hr><div align="center">[Package <em>plstools</em> version 1.0-6 <a href="00Index.html">Index</a>]</div>

</body></html>
